package com.czy.owner.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.TextView;

import com.czy.owner.R;
import com.czy.owner.entity.ScopeBusinessModel;
import com.easyrecycleview.adapter.BaseViewHolder;
import com.easyrecycleview.adapter.RecyclerArrayAdapter;


/**
 * Created by wangyang on 2016/6/14.
 */
public class ScopeBusinessAdapter extends RecyclerArrayAdapter<ScopeBusinessModel> {
    public ScopeBusinessAdapter(Context context) {
        super(context);
    }

    @Override
    public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
        return new ScopeBusinessViewHolder(parent);
    }



    class ScopeBusinessViewHolder extends BaseViewHolder<ScopeBusinessModel> {
        private TextView tv_name;


        public ScopeBusinessViewHolder(ViewGroup parent) {
            super(parent, R.layout.item_scopebusiness);
            tv_name = $(R.id.tv_name);

        }

        @Override
        public void setData(ScopeBusinessModel model) {
            tv_name.setText(model.getServiceName());
            tv_name.setTextColor(getContext().getResources().getColor(R.color.appThemeTextColorBlack));

        }
    }
}
